Skip to main content
POST
/
api
/
v2
/
payment-links
Create a payment link [V2]
curl --request POST \
  --url https://api.loops.fi/api/v2/payment-links \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "label": "<string>",
  "productIds": [
    "<string>"
  ],
  "successUrl": "<string>",
  "cancelUrl": "<string>"
}'
{
  "id": "<string>",
  "label": "<string>",
  "products": [
    {
      "id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "price": 123,
      "currency": "<string>",
      "type": "recurring",
      "status": "<string>",
      "quantity": 123,
      "displayOrder": 123
    }
  ],
  "url": "<string>",
  "successUrl": "<string>",
  "cancelUrl": "<string>",
  "allowDiscountCodes": true,
  "collectBilling": true,
  "metadata": {},
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "views": 123,
  "conversions": 123,
  "revenue": 123,
  "status": "active",
  "merchant": {
    "id": "<string>",
    "companyName": "<string>",
    "logo": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API Key authentication using Bearer token

Body

application/json
label
string

Payment link label

Maximum length: 100
productIds
string[]

Array of product IDs to include in this payment link

successUrl
string<uri>

Success redirect URL

cancelUrl
string<uri>

Cancel redirect URL

Response

Default Response

id
string
required

Unique payment link identifier

label
string
required

Payment link label

products
object[]
required

Array of products in this link

url
string<uri>
required

Public checkout URL

createdAt
string<date-time>
required

Payment link creation time

updatedAt
string<date-time>
required

Payment link last update time

views
number
required

Number of page views

conversions
number
required

Number of completed purchases

revenue
number
required

Total revenue generated

status
enum<string>
required

Link status

Available options:
active,
expired,
disabled
merchant
object
required
successUrl
string<uri>

Success redirect URL

cancelUrl
string<uri>

Cancel redirect URL

allowDiscountCodes
boolean

Whether discount codes are allowed

collectBilling
boolean

Whether billing information is collected

metadata
object

Additional metadata

I